Skip to content

chore(repo): make pnpm dev:sandbox work from any directory#8259

Merged
jacekradko merged 2 commits intomainfrom
jacek/dev-sandbox-anywhere
Apr 7, 2026
Merged

chore(repo): make pnpm dev:sandbox work from any directory#8259
jacekradko merged 2 commits intomainfrom
jacek/dev-sandbox-anywhere

Conversation

@jacekradko
Copy link
Copy Markdown
Member

Summary

  • pnpm dev:sandbox now starts both the @clerk/clerk-js and @clerk/ui rspack dev servers whether you run it from the repo root, packages/clerk-js, or packages/ui. Previously it only worked from the root — running it from inside packages/clerk-js silently launched just the clerk-js server, so the sandbox loaded without UI components.
  • The inner rspack-running tasks in @clerk/clerk-js and @clerk/ui are renamed dev:sandboxdev:sandbox:serve (in both package.json scripts and turbo.json task definitions). New dev:sandbox scripts in those packages proxy to the workspace root via pnpm -w dev:sandbox, so the root turbo dev:sandbox:serve fans out to both packages no matter where you invoke from.
  • Playwright's webServer in packages/clerk-js/playwright.config.ts is pinned to pnpm dev:sandbox:serve to keep its current direct-rspack behavior (port 4000 only, no turbo build dep).
  • Sandbox README updated to reflect that the command now works from anywhere in the repo.

Test plan

  • pnpm dev:sandbox from repo root → both rspack servers up (unchanged behavior)
  • pnpm dev:sandbox from packages/clerk-js → proxies to root → both servers up
  • Sandbox at http://localhost:4000 loads and references http://localhost:4011/npm/ui.browser.js
  • UI bundle served from :4011/npm/ui.browser.js returns 200 (verified live against the running dev servers)
  • turbo run dev:sandbox:serve --dry-run discovers the task in both @clerk/clerk-js and @clerk/ui
  • pnpm build passes (21/21 tasks successful)
  • cd packages/clerk-js && pnpm test:sandbox:integration (Playwright sandbox suite)

Rename the inner rspack dev:sandbox tasks in @clerk/clerk-js and @clerk/ui
to dev:sandbox:serve and add proxy scripts that bounce to the workspace
root via pnpm -w dev:sandbox. Running pnpm dev:sandbox from root,
packages/clerk-js, or packages/ui now consistently starts both rspack
servers, so the UI components always load into the sandbox.

Playwright's webServer is pinned to pnpm dev:sandbox:serve so its direct
rspack behavior is preserved.
@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Apr 7, 2026 4:40pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 7, 2026

🦋 Changeset detected

Latest commit: 0aa7490

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new bot commented Apr 7, 2026

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@8259

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@8259

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@8259

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@8259

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@8259

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@8259

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@8259

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@8259

@clerk/express

npm i https://pkg.pr.new/@clerk/express@8259

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@8259

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@8259

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@8259

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@8259

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@8259

@clerk/react

npm i https://pkg.pr.new/@clerk/react@8259

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@8259

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@8259

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@8259

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@8259

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@8259

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@8259

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@8259

commit: 48cba6c

Copy link
Copy Markdown
Member

@wobsoriano wobsoriano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks!

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 7, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 58209fdf-e039-4476-a507-8970644d0231

📥 Commits

Reviewing files that changed from the base of the PR and between 48cba6c and 0aa7490.

📒 Files selected for processing (1)
  • .changeset/dev-sandbox-anywhere.md
✅ Files skipped from review due to trivial changes (1)
  • .changeset/dev-sandbox-anywhere.md

📝 Walkthrough

Walkthrough

This pull request refactors sandbox dev tooling by splitting the dev:sandbox task into orchestration (dev:sandbox) and a dedicated serve command (dev:sandbox:serve). Changes update root and package-level package.json scripts, rename Turbo tasks in turbo.json files, adjust Playwright's webServer.command to call pnpm dev:sandbox:serve, and update sandbox README instructions. A new changeset file was added. No exported/public API declarations were modified.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly and concisely summarizes the main change: enabling pnpm dev:sandbox to work from any directory in the repo.
Description check ✅ Passed The PR description is detailed and directly related to the changeset, explaining the refactoring from both a user and implementation perspective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@jacekradko jacekradko merged commit cafeda9 into main Apr 7, 2026
40 of 41 checks passed
@jacekradko jacekradko deleted the jacek/dev-sandbox-anywhere branch April 7, 2026 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants